package com.kermel.andromeda.activities.dbtool.viewalarms;

import android.app.ListActivity;
import android.database.Cursor;
import android.os.Bundle;
import android.widget.SimpleCursorAdapter;

import com.kermel.andromeda.R;
import com.kermel.andromeda.data.persistence.AndromedaDatabaseManager;

public class ViewAlarmsActivity extends ListActivity {
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        
        Cursor cursor = AndromedaDatabaseManager.instance.retrieveAllAlarms();
        
        String[] columnsToInspect = new String[] { AndromedaDatabaseManager.KEY_NAME };
        int[] viewsToDisplay = new int[] { android.R.id.text1 };
        SimpleCursorAdapter adapter = new SimpleCursorAdapter(this, R.layout.list_item, cursor, columnsToInspect, viewsToDisplay);
        setListAdapter(adapter);
    }
}
